package com.magus.project.yddemo.controller;

import java.util.List;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.magus.framework.core.controller.BaseController;
import com.magus.framework.core.webbean.highcharts.Series;
import com.magus.framework.system.annotation.AppGroupInfo;
import com.magus.project.yddemo.service.IndicatorAnalysisService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Api(tags = "IndicatorAnalysisManager", description = "指标分析管理")
@RestController
@RequestMapping("/yddemo/indicatorAnalysiss")
@AppGroupInfo(key = "yddemo:indicatorAnalysis", name = "指标分析管理", appKey = "yddemo")
public class IndicatorAnalysisController extends BaseController {
	@Autowired
	private IndicatorAnalysisService indicatorAnalysisSerivce;
	
	@GetMapping("/day")
	@RequiresPermissions("yddemo:indicator:view")
	@ApiOperation(value = "查询日指标分析", notes = "查询日指标分析")
	ResponseEntity<List<Series>> findDay( String indicatorName, Long beginTime) {
		List<Series> result = indicatorAnalysisSerivce.findDay(indicatorName,beginTime);
		return ResponseEntity.ok(result);
	}
}
